package com.syc.ssm.service.impl;

import java.sql.SQLException;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.syc.ssm.dao.IUserDao;
import com.syc.ssm.domain.User;
import com.syc.ssm.service.IUserService;

/**
 * 三层架构中Service层的实现
 */
@Service("userService")
public class UserServiceImpl implements IUserService {

	@Autowired
	@Qualifier("userDao")
	private IUserDao dao;

	/*public void setDao(IUserDao dao) {
		this.dao = dao;
	}
*/
	public void userRegister(User user) {
		try {
			dao.insertUser(user);
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}

	public User userLogin(User user) {

		return null;
	}

}
